1. Field of the Invention
This invention relates to bit-exact lossless compression coding of still and moving images.
2. Description of Related Art
The JPEG-2000 standard (see JPEG2000, Image Compression Fundamentals, Standards, and Practice by David S. Taubman and Michael W. Marcellin, Kluwer Academic Publishers 2002) supports intra-frame (still image or stand-alone moving image) coding. Within JPEG-2000 are two Discrete Wavelet Transforms, DWT 9/7 and DWT 5/3. The 9/7 and 5/3 numbers indicate the number of coefficients in the “bi-orthogonal” sub-band “analysis” and “synthesis” filter kernels of the transforms. The DWT 9/7 transform is used by JPEG-2000 in a “lossy” coding system, where the image bits are not exactly reproduced, but where compression of 10:1 can be achieved with good quality using quantization. The DWT 5/3 system is used by JPEG-2000 in a lossless bit-exact coding system, without quantization, with limited compression efficiency, usually about 2.3:1.
JPEG-2000 does not provide a method of combining the information in the DWT 9/7 transform lossy coding system with the lossless DWT 5/3 transform coding methods. A further limitation of the JPEG-2000 compression system is that it is only designed to code integer pixel values.
In the U.S. patent application entitled “High Precision Encoding and Decoding of Video Images” (Ser. No. 09/798,346, co-invented by the present inventor), an integer exact match is described wherein the result of decoding within an image compression encoder exactly matches the result of decoding within a compressed image decoder. The decoder thus produces exactly the same integer result as produced during encoding. The present inventor utilized this exact match to create a difference residual to the source integer pixel values to create a lossless layered coding system. This work was presented to the MPEG committee in Sydney Australia in July 2001. However, coding efficiency was not as high as JPEG-2000's lossless mode. For example, the integer residual and exact match layered coder achieved about 1.9:1 compression ratio on test images, whereas JPEG-2000's lossless mode achieved about 2.2:1 compression on the same images.
In addition, “High Precision Encoding and Decoding of Video Images” described the use of regional integer scale factors in order to extend integer dynamic range on a regional basis (although all values must be clipped to values above zero). However, there are inherent limitations in the use of integer pixel values for extended dynamic range in images. Further, extended dynamic range was not explored in the context of a lossless coded residual (the July 2001 tests mentioned above had integer values with black at 0 and peak white at 1023).
The OpenExr file format (an open extended range file format developed by Industrial Light & Magic for use in computer imaging applications; see www.openexr.com) supports a “half” precision 16-bit floating point format for pixel values which has extended brightness above peak white (above 1.0) and an extended range of dark value precision, as well as supporting negative numbers. Built into the OpenExr file readers and writers is a “PIZ” compressor, which uses a Haar difference wavelet for pixel pairs (average and difference), followed by Huffman coding. The PIZ compressor gains efficiency if many of the 65,536 possible 16-bit codes are unused, which is often the case. This efficiency gain is achieved by creating an index of codes actually used, and coding the indices (using Haar and Huffman coding) rather than outputting the actual codes. If all of the codes are used, Haar and Huffman coding will usually gain about a 30% bit reduction. If an image using a 10-bit integer pixel value range is converted to at most 1024 16-bit OpenExr values, then the PIZ compression method's index table will usually help achieve compression of about 2:1 (and sometimes a little mbre).
Unlike JPEG-2000, the U.S. patent application entitled “High Quality Wide Range Multi-Layer Image Compression Coding System” (application Ser. No. 11/225,665, filed Sep. 12, 2005, claiming priority to Ser. No. 60/609,773, filed Sep. 14, 2004, by the present inventor) can utilize ubiquitous floating point values at high precision (e.g., 32-bit floating point) at all points except for quantization to or de-quantization from integers. The use of floating point values during encoding and decoding computations provides for substantially higher precision coding of pixel values than typical integer image coding systems (although very large integers could also be used, but existing implementations preserve integer precision to at most 16-bits). Further, floating point processing allows very wide dynamic range of brightness (both very bright and very dark), as well as coding of negative values.
Unlike JPEG-2000, the “High Quality Wide Range Multi-Layer Image Compression Coding System” patent application can provide a strict error bounding (which is optionally a function of brightness and/or color) which can be applied at one or more layers. Also, an optimal filter can be used at one or more layers to bound errors. That application also describes methods to characterize still and moving images to assist in compression processing. For example, the noise floor at each brightness and color can be determined in order to set quantization to a level below such noise floor.